package A2013;

import java.util.Scanner;

public class test {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = 1543;
        int ans = 0;
        while (n > 0) {
            if (n % 2 == 1)
                ans++;
            n /= 2;
        }
        System.out.println(ans);

    }
}